
import request from "../../request/server.ts";
import {reShareFileType} from "../../components/operation/FileApi.ts";

 interface  Result<T>{
    code:string,
    data:T,
    msg:string
}
export  function getUserShareFIleDataApi(data:string):Promise<Result<reShareFileType>>{

    return  request({
        method:"get",
        url:"/share/file/find/"+data,

    })
}


interface  findShareFIleType{

    fid: string,
    type?: number,
    uid: string

}

export interface  userShareFIleType{

    fileName?:string
    filePath?:string
    foldId?:string
    foldName?:string

}

export  function findUserShareFIleDataApi(data: findShareFIleType):Promise<Result<Array<userShareFIleType>>>{
    return  request({
        method:"post",
        url:"/share/file/findFile",
        data

    })
}



export  function  entryFolderFileApi(data: findShareFIleType):Promise<Result<Array<userShareFIleType>>>{
    return  request({
        method:"post",
        url:"/share/file/findBOFile",
        data

    })
}
